<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><% model(2); %></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="15" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="general.js"></script>
<script type="text/javascript">
	var wan_proto = "<% nvram_get("wan_proto"); %>";
	var wan_status_t = "<% nvram_get("wan_status_t"); %>";
	$(document).ready(function() {
		if (getMode() == "AP") {
			$('#wan_data').remove();
			$('#man_data').remove();
		}
		else {
			switch (wan_proto) {
				case 'l2tp':
				case 'pptp':
				case 'pppoe':
					$('#wan_data_hwaddr').remove();
					break;
				case 'wimax':
				case 'usbmodem':
				case 'usbnet':
					$('#wan_data_hwaddr').remove();
					$('#man_data').remove();
					break;
				default:
					$('#man_data').remove();
					break;
			}
		}
		if (!hasUSB()) {
			$('#prn_data').hide();
		}
		if (wan_status_t == "Connected" || wan_status_t == "Connecting...") {
			$('[name="PPPConnection_x_WANAction_button"]').prop('disabled', false);
			$('[name="PPPConnection_x_WANAction_button1"]').prop('disabled', true);
		}
		else {
			$('[name="PPPConnection_x_WANAction_button"]').prop('disabled', true);
			$('[name="PPPConnection_x_WANAction_button1"]').prop('disabled', false);
		}
		load_body();
	});
</script>
</head>
<body>
<form method="get" name="form" id="form" action="apply.cgi">
<input type="hidden" name="current_page" value="status.asp" />
<input type="hidden" name="next_page" value="default value" />
<input type="hidden" name="next_host" value="" />
<input type="hidden" name="group_id" value="" />
<input type="hidden" name="modified" value="0" />
<input type="hidden" name="action_mode" value="" />
<input type="hidden" name="first_time" value="" />
<input type="hidden" name="action_script" value="" />
<input type="hidden" name="load_script" value="<% load_script("printer.sh"); %>" />

<table class="main">
<thead>
<tr>
<td>Status &amp; Log - Status</td>
</tr>
</thead>

<tr><td>
<table class="sect">
<tr>
<th>Router model:
           </th><td><% model(2); %></td>
</tr>
<tr>
<th>System Time:
           </th><td><% systime(); %></td>
</tr>
<tr>
<th title="Elapsed time since system boot">Uptime:
           </th><td class="content_text_td"><% uptime(); %></td>
</tr>
</table>
</td></tr>

<tr><td>
<table class="sect" id="wan_data">
<thead>
<tr>
<td colspan="2">WAN Interface</td>
</tr>
</thead>
<tr>
<th>WAN Type:
           </th><td id="wan_proto_t"><% nvram_get("wan_proto_t"); %></td>
</tr>
<tr id="wan_data_hwaddr">
<th>MAC Address:
           </th><td id="wan0_hwaddr"><% nvram_get("wan0_hwaddr"); %></td>
</tr>
<tr>
<th>IP Address:
           </th><td id="wan_ipaddr_t"><% nvram_get("wan_ipaddr_t"); %></td>
</tr>
<tr>
<th>Subnet Mask:
           </th><td id="wan_netmask_t"><% nvram_get("wan_netmask_t"); %></td>
</tr>
<tr>
<th>Gateway:
           </th><td id="wan_gateway_t"><% nvram_get("wan_gateway_t"); %></td>
</tr>
<tr>
<th>DNS Servers:
           </th><td id="wan_dns_t"><% nvram_get("wan_dns_t"); %></td>
</tr>
<tr>
<th>Link Status:
           </th><td id="wan_status_t"><% nvram_get("wan_status_t"); %></td>
</tr>
<tr>
<th>Action:
           </th><td><input type="submit" maxlength="15" class="content_input_button" onClick="return onSubmitApply('dhcpc_release')" size="12" name="PPPConnection_x_WANAction_button" value="Disconnect" /><input type="submit" maxlength="15" class="content_input_button" onClick="return onSubmitApply('dhcpc_renew')" size="12" name="PPPConnection_x_WANAction_button1" value="Connect" /></td>
</tr>
</table>
</td></tr>

<tr><td>
<table class="sect" id="man_data">
<thead>
<tr>
<td colspan="2">MAN Interface</td>
</tr>
</thead>
<tr>
<th>MAC Address:
           </th><td id="wan0_xhwaddr"><% nvram_get("wan0_hwaddr"); %></td>
</tr>
<tr>
<th>IP Address:
           </th><td id="wan0_xipaddr"><% nvram_get("wan0_xipaddr"); %></td>
</tr>
<tr>
<th>Subnet Mask:
           </th><td id="wan0_xnetmask"><% nvram_get("wan0_xnetmask"); %></td>
</tr>
<tr>
<th>Gateway:
           </th><td id="wan0_xgateway"><% nvram_get("wan0_xgateway"); %></td>
</tr>
<tr>
<th>DNS Servers:
           </th><td class="content_text_td" id="wan0_xdns"><% nvram_get("wan0_xdns"); %></td>
</tr>
</table>
</td></tr>

<tr><td>
<table class="sect" id="prn_data">
<thead>
<tr>
<td colspan="2">Printer</td>
</tr>
</thead>
<tr>
<th title="Model of printer connected to the router.">Printer Model:
           </th><td id="printer_model_t"><% nvram_get("printer_model_t"); %></td>
</tr>
<tr>
<th title="Current status of printer">Printer Status:
           </th><td id="printer_status_t"><% nvram_get("printer_status_t"); %></td>
</tr>
<tr>
<th title="IP address of user using this printer.">User:
           </th><td id="printer_user_t"><% nvram_get("printer_user_t"); %></td>
</tr>
<tr>
<th>Action:
           </th><td><input type="submit" maxlength="15" class="content_input_button" onClick="return onSubmitApply('lpr_remove')" size="12" name="PrinterStatus_x_PrinterAction_button" value="Remove" /></td>
</tr>
</table>
</td></tr>

<tr><td>
<table class="sect">
<thead>
<tr>
<td colspan="2">LAN Interface</td>
</tr>
</thead>
<tr>
<th>MAC Address:
           </th><td id="lan_hwaddr"><% nvram_get("lan_hwaddr"); %></td>
</tr>
<tr>
<th>IP Address:
           </th><td id="lan_ipaddr_t"><% nvram_get("lan_ipaddr_t"); %></td>
</tr>
<tr>
<th>Subnet Mask:
           </th><td id="lan_netmask_t"><% nvram_get("lan_netmask_t"); %></td>
</tr>
<tr>
<th>Default Gateway:
           </th><td id="lan_gateway_t"><% nvram_get("lan_gateway_t"); %></td>
</tr>
</table>
</td></tr>

</table>

<table class="foot">
<tr>  
   <td height="25" width="75%">&nbsp;</td>
   <td height="25">  
   <div align="center"><input class="inputSubmit" onClick="onSubmitCtrl(this, ' Refresh ')" type="submit" value="Refresh" name="action" /></div> 
   </td>
</tr>
</table>

</form>
</body>
</html>
